﻿@model RedSand.Site.Models.ReplyInfo
<div id="box-comment">
    @using (Ajax.BeginForm("feWriteComment", "Reply", new AjaxOptions { UpdateTargetId = "box-list-comment", OnBegin="return checkcomment()", OnSuccess = "callbackfn()" }))
    {
       
        @Html.HiddenFor(m => m.NewsID)
        <label>Comments</label>
        <br />
        @Html.TextAreaFor(m => m.Content, new { style = "width:99%" })
        <input type="submit" value="Submit" class="btn" />
    }
</div>
<script type="text/javascript">
    function callbackfn() {
        $('#Content').val('');
    }
    function checkcomment() {
        if ($.trim($('#box-comment form textarea').val()).length < 100) {
            showMessage('Content too short (minimum 100 characters)');
            return false;
        }
    }
</script>
